package com.example.springboot.service.impl;

import com.example.springboot.pojo.EmailProperties;
import com.example.springboot.service.EmailService;
import com.example.springboot.utils.MailUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmailServiceImpl implements EmailService{
    @Autowired
    private EmailProperties emailProperties;

    /**
    * @param to
    * @param title
    * @param content
    * @return
    */
    @Override
    public boolean send(String to,String title,String content){
        System.out.println(emailProperties);
        boolean flag = MailUtil.sendMail(emailProperties,to,title,content);
        return flag;
    }
}
